home *** CD-ROM | disk | FTP | other *** search
- property myUpState, myRollState, myDnState, myS, myHandler, myType, mySystemcursor, myBitmapCursor, myBitmapCursorMask
-
- on beginSprite me
- theMember = sprite(the currentSpriteNum).member
- theMemberNumber = theMember.number
- me.myUpState = member(theMemberNumber)
- me.myRollState = member(theMemberNumber + 1)
- me.myDnState = member(theMemberNumber + 2)
- me.myS = the currentSpriteNum
- me.myHandler = sprite(the currentSpriteNum).member.name
- end
-
- on mouseEnter me
- if rollOver(me.myS) <> 1 then
- exit
- end if
- sprite(me.myS).member = me.myRollState
- if me.myBitmapCursor = EMPTY then
- sprite(me.myS).cursor = me.mySystemcursor
- else
- sprite(me.myS).cursor = [the number of member value(the myBitmapCursor of me), the number of member value(the myBitmapCursorMask of me)]
- end if
- updateStage()
- end
-
- on mouseLeave me
- sprite(me.myS).member = me.myUpState
- sprite(me.myS).cursor = 0
- updateStage()
- end
-
- on mouseDown me
- global gNavTracker2
- whichSprite = myS
- actNow = 1
- dnClick = "click1"
- upClick = "click2"
- playedSNDFX = 0
- puppetSound(3, dnClick)
- playedSNDFX = 1
- set the member of sprite whichSprite to myDnState
- updateStage()
- actNow = 1
- if not (the stillDown) then
- wait(3)
- end if
- repeat while the stillDown
- if rollOver(whichSprite) then
- if not playedSNDFX then
- puppetSound(3, dnClick)
- set the member of sprite whichSprite to myDnState
- playedSNDFX = 1
- actNow = 1
- end if
- else
- if playedSNDFX then
- puppetSound(3, upClick)
- set the member of sprite whichSprite to myUpState
- playedSNDFX = 0
- actNow = 0
- end if
- end if
- updateStage()
- end repeat
- if the member of sprite whichSprite = myDnState then
- set the member of sprite whichSprite to myUpState
- puppetSound(3, upClick)
- end if
- updateStage()
- repeat while soundBusy(3)
- updateStage()
- end repeat
- puppetSound(3, 0)
- gNavTracker2 = VOID
- if actNow = 1 then
- do(myHandler)
- end if
- end
-
- on simBtnObj me
- if me.myType = "chk" then
- if me.myOnOff then
- puppetSound(3, "click1")
- set the member of sprite the myS of me to me.myOnDnstate
- updateStage()
- wait(15)
- puppetSound(3, "click2")
- set the member of sprite the myS of me to me.myOnUpstate
- updateStage()
- me.myOnOff = 0
- else
- puppetSound(3, "click1")
- set the member of sprite the myS of me to me.myDnState
- updateStage()
- wait(15)
- puppetSound(3, "click2")
- set the member of sprite the myS of me to me.myUpState
- updateStage()
- me.myOnOff = 1
- end if
- else
- puppetSound(3, "click1")
- set the member of sprite the myS of me to me.myDnState
- updateStage()
- wait(15)
- puppetSound(3, "click2")
- set the member of sprite the myS of me to me.myUpState
- updateStage()
- end if
- do(myHandler)
- end
-
- on getPropertyDescriptionList
- if the currentSpriteNum = 0 then
- exit
- end if
- theMember = sprite(the currentSpriteNum).member
- theMemberNumber = theMember.number
- if sprite(the currentSpriteNum).member.type = #graphic then
- castFormatType = #bitmap
- else
- if sprite(the currentSpriteNum).member.type = #bitmap then
- castFormatType = #bitmap
- else
- if sprite(the currentSpriteNum).member.type = #shape then
- castFormatType = #shape
- else
- castFormatType = [#graphic, #text]
- end if
- end if
- end if
- p_list = [#mySystemcursor: [#comment: "my system cursor:", #format: #cursor, #default: 280], #myBitmapCursor: [#comment: "Mac Color Cursor or Cursor:", #format: [#bitmap, #cursor], #default: EMPTY], #myBitmapCursorMask: [#comment: "PC Color Cursor or Cursor Mask:", #format: [#bitmap, #cursor], #default: EMPTY]]
- return p_list
- end
-
- on getBehaviorDescription
- return "new button handler"
- end
-